
from django.db import models

# Create your models here.

# 问卷实体映射
class QTemplateModel(models.Model):
    template_name = models.CharField(max_length=255)
    creator_id=models.CharField(max_length=255)
    num_questions = models.IntegerField()
    questions = models.JSONField(default=dict)
    timer_duration = models.CharField(max_length=255)
    template_uuid = models.CharField(max_length=255)
    created_time = models.DateTimeField(auto_now_add=True)

# 用户参与
class JoinUserAnswersModel(models.Model):
    user_id = models.CharField(max_length=255)
    template_uuid = models.CharField(max_length=255)
    answers=models.JSONField(default=dict)
    status=models.CharField(max_length=10,default=0)
    created_time = models.DateTimeField(auto_now_add=True)